<%= polaris_popover(alignment: :left) do |popover| %>
  <% popover.with_activator do %>
    <button
      type="button"
      class="Polaris-TopBar-Menu__Activator"
      data-action="polaris-popover#toggle click@window->polaris-popover#hide"
    >
      <span class="Polaris-TopBar-UserMenu__Details">
        <%= polaris_text(
          as: :p,
          font_weight: :medium,
          truncate: true,
          alignment: :start
        ) do %>
          <%= @name %>
        <% end %>
        <%= polaris_text(
          as: :p,
          variant: :bodySm,
          truncate: true,
          alignment: :start,
          color: :subdued
        ) do %>
          <%= @detail %>
        <% end %>
      </span>
      <div class="Polaris-MessageIndicator__MessageIndicatorWrapper">
        <%= avatar %>
      </div>
    </button>
  <% end %>

  <%= content %>
<% end %>
